package svgedit.gui.actions;

import java.awt.event.ActionEvent;
import java.io.File;

import javax.swing.AbstractAction;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

import svgedit.gui.Frame;
import svgedit.gui.SVGFileFilter;
import svgedit.xml.XMLWriter;

public class SaveAsAction extends AbstractAction{
	
	private Frame frame;
	XMLWriter writer = new XMLWriter();
	JFileChooser fc;

    /** Create this action for the given frame */
    public SaveAsAction(Frame frame) {
        super("Save As...");
        fc = new JFileChooser();
        fc.addChoosableFileFilter(new SVGFileFilter());
        this.frame = frame;
    }
	@Override
	public void actionPerformed(ActionEvent arg0) 
	{
		new SaveAsUtil().SaveAs(frame);
	}
}
